//
//  SmsCloudEarchView.m
//  smsCloud
//
//  Created by 蓝鳍互娱 on 2024/7/18.
//

#import "SmsCloudEarchView.h"
@interface SmsCloudEarchView()

@end
@implementation SmsCloudEarchView
-(instancetype)init{
    if (self == [super init]) {
        [self smsCloudInitView];
    }
    return self;
}
- (void)smsCloudInitView{
    UIButton * smsCloudEarchBtn = [[UIButton alloc] init];
    [smsCloudEarchBtn setBackgroundImage:[SmsCloudHead SmsCloudImageNamed:@"smsCloudEarch"] forState:UIControlStateNormal];
    [smsCloudEarchBtn addTarget:self action:@selector(smsCloudEarch) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:smsCloudEarchBtn];
    [smsCloudEarchBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.bottom.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
    }];
    UIButton * smsCloudRecordBtn = [[UIButton alloc] init];
    [smsCloudRecordBtn setBackgroundImage:[SmsCloudHead SmsCloudImageNamed:@"smsCloudRecord"] forState:UIControlStateNormal];
    [smsCloudRecordBtn addTarget:self action:@selector(smsCloudRecord) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:smsCloudRecordBtn];
    [smsCloudRecordBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(smsCloudEarchBtn.mas_right);
        make.right.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.top.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.bottom.equalTo(@([SmsCloudHead SmsCloudScreewRatio:0]));
        make.width.equalTo(smsCloudEarchBtn);
    }];
}
- (void)smsCloudEarch{
    if (self.SmsCloudEarchBlock) {
        self.SmsCloudEarchBlock();
    }
}
- (void)smsCloudRecord{
    if (self.SmsCloudRecordBlock) {
        self.SmsCloudRecordBlock();
    }
}
@end
